<template>
    <view class="container">
        <view class="list">
            <view class="list-item" v-for="(item, __i0__) in list" :key="__i0__">
                <view class="list-body">
                    <view class="action">{{ '' + item.description + '' }}</view>
                    <view class="date-time">{{ '' + item.created_at + '' }}</view>
                </view>

                <view class="right">
                    <text class="redNew" v-if="item.type === 1">{{ '+' + item.value }}</text>
                    <text class="grayNew" v-else>{{ '-' + item.value }}</text>
                </view>
            </view>
        </view>
        <no-data @__l="__l" title="暂无赏币明细" vueId="db14d134-1" v-if="$root.g0"></no-data>
    </view>
</template>

<script>
import noData from '@/components/NoData/NoData';
import tabBar from '@/components/TabBar/tabBar';
(global.webpackJsonp = global.webpackJsonp || []).push([
    ['pages/myScore/index'],
    {
        '10e1': function (t, e, n) {
            'use strict';

            n.r(e);
            var r = n('5b64');
            var a = n('c0b1');
            for (var u in a) {
                if (['default'].indexOf(u) < 0) {
                    (function (t) {
                        n.d(e, t, function () {
                            return a[t];
                        });
                    })(u);
                }
            }
            n('582d');
            var o = n('f0c5');
            var i = Object(o.a)(a.default, r.b, r.c, false, null, null, null, false, r.a, void 0);
            e.default = i.exports;
        },
        '4d60': function (t, e, n) {
            'use strict';

            (function (t) {
                var r = n('4ea4');
                Object.defineProperty(e, '__esModule', {
                    value: true
                });
                e.default = void 0;
                var a = r(n('2eee'));
                var u = r(n('448a'));
                var o = r(n('c973'));
                var i = n('c51d');
                var c = {
                    components: {},
                    data: function () {
                        return {
                            list: [],
                            total: 0,
                            page: 1,
                            per_page: 20,
                            init: false,
                            loading: false
                        };
                    },
                    computed: {
                        navBar: function () {
                            return this.$store.getters.deviceInfo.customBar;
                        },
                        userInfo: function () {
                            return this.$store.getters.userInfo;
                        },
                        setting: function () {
                            return this.$store.getters.setting.score || {};
                        },
                        isBuyEnabled: function () {
                            return this.setting.is_buy_enabled;
                        }
                    },
                    onLoad: function () {
                        var that = this;
                        return (0, o.default)(
                            a.default.mark(function n() {
                                var r;
                                var o;
                                return a.default.wrap(function (n) {
                                    for (;;) {
                                        switch ((n.prev = n.next)) {
                                            case 0:
                                                that.$store.dispatch('getUserInfo');
                                                t.showLoading({
                                                    title: '加载中'
                                                });
                                                n.next = 4;
                                                return that.getScoreRecord();
                                            case 4:
                                                o = n.sent;
                                                t.hideLoading();
                                                that.init = true;
                                                (r = that.list).push.apply(r, (0, u.default)(o.data.list));
                                                that.total = o.data.item_total;
                                                t.setNavigationBarTitle({
                                                    title: '我的' + that.scoreAlias
                                                });
                                            case 10:
                                            case 'end':
                                                return n.stop();
                                        }
                                    }
                                }, n);
                            })
                        )();
                    },
                    onReachBottom: function () {
                        var that = this;
                        return (0, o.default)(
                            a.default.mark(function e() {
                                var n;
                                var r;
                                return a.default.wrap(function (e) {
                                    for (;;) {
                                        switch ((e.prev = e.next)) {
                                            case 0:
                                                if (!that.loading) {
                                                    e.next = 2;
                                                    break;
                                                }
                                                return e.abrupt('return');
                                            case 2:
                                                that.loading = true;
                                                that.page++;
                                                e.next = 6;
                                                return that.getScoreRecord();
                                            case 6:
                                                r = e.sent;
                                                that.loading = false;
                                                (n = that.list).push.apply(n, (0, u.default)(r.data.list));
                                            case 9:
                                            case 'end':
                                                return e.stop();
                                        }
                                    }
                                }, e);
                            })
                        )();
                    },
                    methods: {
                        getScoreRecord: function () {
                            var that = this;
                            return (0, o.default)(
                                a.default.mark(function e() {
                                    return a.default.wrap(function (e) {
                                        for (;;) {
                                            switch ((e.prev = e.next)) {
                                                case 0:
                                                    e.next = 2;
                                                    return (0, i.getScoreRecord)({
                                                        page: that.page,
                                                        per_page: that.per_page
                                                    });
                                                case 2:
                                                    return e.abrupt('return', e.sent);
                                                case 3:
                                                case 'end':
                                                    return e.stop();
                                            }
                                        }
                                    }, e);
                                })
                            )();
                        },
                        scoreRedPack: function () {
                            t.navigateTo({
                                url: '/pages/scoreRedPack/index'
                            });
                        }
                    }
                };
                e.default = c;
            }.call(this, n('543d').default));
        },
        '582d': function (t, e, n) {
            'use strict';

            var r = n('5871');
            n.n(r).a;
        },
        5871: function (t, e, n) {},
        '5b64': function (t, e, n) {
            'use strict';

            n.d(e, 'b', function () {
                return a;
            });
            n.d(e, 'c', function () {
                return u;
            });
            n.d(e, 'a', function () {
                return r;
            });
            var r = {
                NoData: function () {
                    return n.e('components/NoData/NoData').then(n.bind(null, 'cafe'));
                }
            };
            var a = function () {
                this.$createElement;
                var t = (this._self._c, !this.list.length && this.init);
                this.setData(
                    Object.assign(
                        {},
                        {
                            $root: {
                                g0: t
                            }
                        }
                    )
                );
            };
            var u = [];
        },
        b5d7: function (t, e, n) {
            'use strict';

            (function (t, e) {
                var r = n('4ea4');
                n('18ba');
                r(n('66fd'));
                var a = r(n('10e1'));
                t.__webpack_require_UNI_MP_PLUGIN__ = n;
                e(a.default);
            }.call(this, n('bc2e').default, n('543d').createPage));
        },
        c0b1: function (t, e, n) {
            'use strict';

            n.r(e);
            var r = n('4d60');
            var a = n.n(r);
            for (var u in r) {
                if (['default'].indexOf(u) < 0) {
                    (function (t) {
                        n.d(e, t, function () {
                            return r[t];
                        });
                    })(u);
                }
            }
            e.default = a.a;
        }
    },
    [['b5d7', 'common/runtime', 'common/vendor']]
]);
</script>
<style>
@import './index.css';
</style>
